using System;

class PrintMyName
{
    static void Main()
    {
		//Write a program that safely compares floating-point numbers with precision of 0.000001. 
		//Examples:(5.3 ; 6.01) -> false;  (5.00000001 ; 5.00000003) -> true
		decimal first = 5.3M;
		decimal second = 6.01M;
		decimal third = 5.00000001M;
		decimal fourth = 5.00000003M;
        Console.WriteLine("Entered numbers:{0}, {1}, {2}, {3}", first, second, third, fourth);
		Console.WriteLine("Compare {0} with {1} and {2} with {3} are equal", first, second, third, fourth);
		Console.WriteLine("With decimal type - safely compare: {0}, {1} ", first==second, third == fourth);
		float firstinf = 5.3f;
		float secondinf = 6.01f;
		float thirdinf =  5.00000001f;
		float fourthinf = 5.00000003f;
		Console.WriteLine("With float type - not safely compare: {0}, {1} ", firstinf==secondinf, thirdinf == fourthinf);
		
    }
}
